lcDrwSaveMem Home

Saves a drawing's data into a memory buffer.

 int lcDrwSaveMem (
   HANDLE hDrw,
   HANDLE hMem,
   int MemSize
 );

Parameters
hDrw
  Handle to a drawing object.
hMem
  Pointer to a memory buffer. If this value is NULL, then LiteCAD will not write to a memory, but, calculates the drawing's size only.
MemSize
  Size of the memory buffer, in bytes. This will be ignored if the hMem argument is NULL.

Return Value

  Number of bytes copied to a memory. If the return value is zero - an error occurred during this operation. This can happen if the memory buffer size is too small to contain the drawing.
If hMem parameter is NULL, then the return value is a number of bytes required to contain the drawing.

Remarks

  Your application must allocate a memory buffer of sufficient size to store the drawing. To determine the drawing's equivalent buffer size, use this function with the hMem=NULL parameter.

See Also

  lcDrwSavelcDrwLoadlcDrwLoadMem